// 引用网络请求中间件
import request from '../../utils/request.js';

export default {
	register(data) {
		return request({
			url: `/app/user/register`,
			method: 'POST',
			data
		})
	},

	login(data) {
		return request({
			url: `/app/login`,
			method: 'POST',
			data
		})
	},

	logout() {
		return request({
			url: `/logout`,
			method: 'GET',
		})
	},


	captcha(phone) {
		return request({
			url: `/app/getcaptcha/${phone}`,
			method: 'GET',
		})
	},


	loginByUser(data) {
		return request({
			url: `/app/login`,
			method: 'POST',
			data
		})
	},

	loginByPhone(data) {
		return request({
			url: `/app/captcha`,
			method: 'POST',
			data
		})
	},

}